using MediatR;
using B.S.XZYData.ErrorCode;

namespace B.S.XZYData.Api.Wrter.Application.Command.Route
{
    /// <summary>
    /// 导入工艺路线命令
    /// </summary>
    public class ImportRouteCommand : IRequest<ApiResult<ImportRouteResult>>
    {
        /// <summary>
        /// Excel文件字节数组
        /// </summary>
        public byte[] FileBytes { get; set; }

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        public string OperateBy { get; set; }
    }

    /// <summary>
    /// 导入结果
    /// </summary>
    public class ImportRouteResult
    {
        /// <summary>
        /// 成功导入的工艺路线数量
        /// </summary>
        public int SuccessRouteCount { get; set; }

        /// <summary>
        /// 成功导入的工序数量
        /// </summary>
        public int SuccessStepCount { get; set; }

        /// <summary>
        /// 失败的记录数量
        /// </summary>
        public int FailedCount { get; set; }

        /// <summary>
        /// 错误信息列表
        /// </summary>
        public List<string> ErrorMessages { get; set; } = new List<string>();
    }
} 